<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8" language="java"
	import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/page/base.jsp"%>
<%@ taglib prefix="d" uri="/doone-comm-ui-tags"%>
<html>
	<head>
		<title>留言板 管理</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link type="text/css" href="<%=path%>/manage/css/layout.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/manage/css/Tooltip.css" />
        <link type="text/css" href="<%=path%>/manage/css/new_style.css" rel="stylesheet" />

		<script type="text/javascript"
			src="<%=path%>/manage/js/jquery-1.4.4.min.js"></script>

		<script type="text/javascript"
			src="<%=path%>/manage/js/easyTooltip.js"></script>
		<script type="text/javascript"
			src="<%=path%>/manage/js/jquery-ui-1.8.11.custom.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/manage/js/jquery.wysiwyg.js"></script>
		<script type="text/javascript"
			src="<%=path%>/manage/js/hoverIntent.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/superfish.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/custom.js"></script>
		<script type="text/javascript"
			src="<%=path%>/manage/js/My97DatePicker/WdatePicker.js"></script>
	</head>

	<script type="text/javascript">
	$(document).ready(function() {
		//留言检索处理
		$("#searchBtn").click(function() {
			$("#searchForm").submit();
		});
	});
	function delFeedBackInfo(id) {
		if (confirm("是否确定删除该条记录？")) {	  	  
			$.ajax({
				url : root+'/feedBack/delRootFeedInfo.action',
				method : 'post',
				dataType:'json',			
				data:{'intFeedbackId' : id},
				success : function(data) {
				  alert("删除成功");
				  window.location.href=root+'/feedBack/getRootFeedInfo.action';
				},
				error:function(err){
					if(err.responseText!='')
						alert(err.responseText);
					else
						alert("请求失败！");
				}
			});
				}
	}	
</script>
	<body>
		<div>
			<p class="sitemap">
				当前位置：内容管理 > 留言板管理
			</p>
			<h1>
				留言管理
			</h1>
			<div>
				<!-- Tabs -->
				<div id="tabs">
					<ul>
						<li>
							<a href="#tabs-1">留言内容列表</a>
						</li>

					</ul>
		<!-- 检索 -->
	
			<form name="searchForm" id="searchForm" method="post"
				action="<%=path%>/feedBack/getRootFeedInfo.action" style="margin:10px 0;">
				留言人:
				<s:textfield name="condition.varUserName"></s:textfield>
				留言内容
				<s:textfield name="condition.varFeedbackContent"></s:textfield>
				<input type="button" id="searchBtn" value="检索">
				<script type="text/javascript">
					function resetSearchCondition(){
						$("#condition_varUserName").val("");
						$("#condition_varFeedbackContent").val("");
					}
				</script>
				<input type="button" id="setBtn" value="重置" onclick="resetSearchCondition()">
			</form>			
				<table class="fullwidth" cellpadding="0" cellspacing="0" border="0">
			 <thead>
						<tr>
							<td>
								留言人
							</td>
							<td>
								电话号码
							</td>
							<%-- 
							<td>
								留言标题
							</td>
							--%>
							<td>
								留言内容
							</td>
							<td>
								留言时间
							</td>
							<td>
								操作
							</td>
						</tr>
						</thead>
		<tbody>
						<s:iterator value="rootFeedList" >
							<tr class="odd">
								<td>
									<s:property value="varUserName" />
								</td>
								<td><s:property value="varUserPhoneNum"/></td>
								<%-- 
								<td>
									<s:property value="varFeedbackTitle" />
								</td>
								--%>
								<td>
									<s:if test="varFeedbackContent.length()>30">
										<s:property value="varFeedbackContent.substring(0,30)" />...
									</s:if>
									<s:else>
										<s:property value="varFeedbackContent" />
									</s:else>
								</td>
								<td>
									<s:property value="datFeedbackDatetime" />
								</td>
								<td>
									<a class="icon icon_detail" title="详情"  href="<%=path %>/feedBack/getFeedBackDetailInfo?intFeedbackId=<s:property value="intFeedbackId" />&intUserId=<s:property value="intUserId" />"></a>
									<a class="icon icon_delete" title="删除 " href="javascript:delFeedBackInfo('<s:property value="intFeedbackId" />')"></a>
								</td>

							</tr>
						</s:iterator>
					</tbody>					
				</table>
		</div>
			<div align="right" style="float: right;">
				<d:page id="page" template="details" skin="gray">
				</d:page>
			</div>
		</div>
		</div>


	</body>
</html>
